c# remove duplicates from list

53

c# list remove item based on property duplicate -

fooArray.GroupBy(x => x.Id).Select(x => x.First());

c# remove duplicates from list -

List<T> withDupes = LoadSomeData();
List<T> noDupes = withDupes.Distinct().ToList();

Comments

Submit
0 Comments